<%@ page language="java" errorPage="/error.jsp" pageEncoding="UTF-8" contentType="text/html;charset=utf-8" %>
<%@ include file="/common/taglibs.jsp" %>

<s:action name="product-comment!search" executeResult="false" namespace="" var="productCommentList">
    <s:param name="query.order">addTime</s:param>
    <s:param name="query.desc">true</s:param>
    <s:param name="query.enabled">true</s:param>
    <s:param name="query.pagesize">10</s:param>
</s:action>

<c:if test="${page.size>0}">
    <s:iterator value="%{#productCommentList.productComments}" var="productComment" status="rowStatus">
        <div class="u-item">
            <div class="u-ath">
                <img src="${productComment.user.photo}!icon.jpg">
                <span class="name">${productComment.user.nickname}</span>
                        <span class="data"><s:date name="%{#productComment.addTime}"
                                                   format="yyyy-MM-dd"/></span>
            </div>
            <div class="u-text">
                <p class="info">${productComment.content}</p>
                <div class="imgs f-cb">
                    <c:if test="${productComment.imgs!=null && productComment.imgs!=''}">
                        <c:set var="productImgs" value="${fn:split(productComment.imgs, ',')}"></c:set>
                        <c:if test="${fn:length(productImgs)>0}">
                            <c:forEach var="im" items="${productImgs}" varStatus="status" end="10">
                                <%--<img src="${im}!icon.jpg">--%>
                                <span  onclick="openImg('${im}')" style="background-image:url('${im}!icon.jpg')"></span>
                            </c:forEach>
                        </c:if>
                    </c:if>
                </div>
                <p class="size">数量：${productComment.orderItem.quantity}</p>
            </div>
        </div>

    </s:iterator>
</c:if>